#ifndef _BSP_IIC_H_
#define _BSP_IIC_H_
#include "stm32g0xx_hal.h"

#define IIC_SDA_PORT					GPIOC
#define IIC_SDA_PIN						GPIO_PIN_14
#define IIC_SDA_HIGH()					HAL_GPIO_WritePin(IIC_SDA_PORT, IIC_SDA_PIN, GPIO_PIN_SET)
#define IIC_SDA_LOW()					HAL_GPIO_WritePin(IIC_SDA_PORT, IIC_SDA_PIN, GPIO_PIN_RESET)

#define IIC_SCL_PORT					GPIOC
#define IIC_SCL_PIN						GPIO_PIN_13
#define IIC_SCL_HIGH()					HAL_GPIO_WritePin(IIC_SCL_PORT, IIC_SCL_PIN, GPIO_PIN_SET)
#define IIC_SCL_LOW()					HAL_GPIO_WritePin(IIC_SCL_PORT, IIC_SCL_PIN, GPIO_PIN_RESET)

void bsp_iic_start(void);
void bsp_iic_stop(void);
void bsp_iic_wait(void);
void bsp_iic_send_byte(uint8_t dat);
void bsp_iic_send(uint8_t dat,uint8_t mode);

#endif /* _BSP_IIC_H_ */
